<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="box">
        <span v-if="sex==0">男</span>

        <span v-else-if="sex==1">女</span>

        <span v-else>保密</span>
    </div>

    <script>
        let vm = new Vue({
            el:"#box",
            data:{
                sex:0, // 假设有个变量表示性别
            }
        })
    </script>
</body>
</html>